/**
{
"style":{
"navigationBarTitleText":"常见问题",
"navigationStyle": "default"
}
}
*/

<template>
	<view class="hh100 pb20">
		<xi-list ref="$list" class="bg#f5f5f5" :query="on.query" :pageSize="30">
			<template #default="{ data }">
				<view class="list">
					<view class="item flex-lr-tbc relative" v-for="item in data" :key="item.id"
						@click="jumpDetail(item)">
						<view class="title pr30">
							{{item.name}}
						</view>

						<view class="row flex-shrink">
							<image class="w11 h19" src="/pages/common/images/row-r1.png" mode=""></image>
						</view>
					</view>
				</view>
			</template>
		</xi-list>
	</view>
</template>
<script setup>
	import {
		ref,
		onMounted
	} from 'vue'
	const isiPhone = ref('')
	const statusBar = ref('')
	const customBar = ref('')
	const getPageInfo = () => {}
	const initPage = () => {
		isiPhone.value = uni.getStorageSync('isiPhone')
		statusBar.value = uni.getStorageSync('statusBar')
		customBar.value = uni.getStorageSync('customBar')
	}

	let on = {
		async query(req) {
			let res = await $post("/user/get_problem", {
				...req
			})
			let obj = {
				data: res.list
			}
			return obj
		}
	}


	const jumpDetail = (item) => {
		uni.navigateTo({
			url: '/pages/question/question/detail?id=' + item.id
		})
	}

	Vue.onShow(() => {
		initPage()
	})
	Vue.onLoad(() => {})
</script>
<style scoped lang='scss'>
	.list {
		background-color: #fff;
		padding: 0 24rpx;

		.item {
			padding: 40rpx 0;
			border-bottom: 1rpx solid #eee;

			&:last-child {
				border-bottom: none;
			}
		}
	}
</style>